# -*- coding: utf-8 -*-
# @File      :递归器
# @Author    :liaogan
# @Datetime  :2023/2/1 21:03



def factorial_fuc(num):
    if num>1:
        return  num * factorial_fuc(num-1)
    else:
        return num

factorial_fuc(3)
"""
第一轮执行
return 3 * factorial_fuc(2)
return 3*2*factorial_fuc(1)
return 3*2*1

factorial_fuc(2) = 2 * factorial_fuc(1)
factorial_fuc(1)=1
"""